package models;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "t_WeigherInfo", schema = "dbo", catalog = "MobileCenter_Test")
public class WeigherInfo_T_Entity {
    private int fdRowid;
    private String fdWeigherCode;
    private String fdWeigherName;
    private String fdAreaCode;
    private String fdAreaName;
    private String fdTransType;

    @Id
    @Column(name = "fd_Rowid", nullable = false)
    public int getFdRowid() {
        return fdRowid;
    }

    public void setFdRowid(int fdRowid) {
        this.fdRowid = fdRowid;
    }

    @Basic
    @Column(name = "fd_WeigherCode", nullable = false, length = 50)
    public String getFdWeigherCode() {
        return fdWeigherCode;
    }

    public void setFdWeigherCode(String fdWeigherCode) {
        this.fdWeigherCode = fdWeigherCode;
    }

    @Basic
    @Column(name = "fd_WeigherName", nullable = false, length = 50)
    public String getFdWeigherName() {
        return fdWeigherName;
    }

    public void setFdWeigherName(String fdWeigherName) {
        this.fdWeigherName = fdWeigherName;
    }

    @Basic
    @Column(name = "fd_AreaCode", nullable = true, length = 10)
    public String getFdAreaCode() {
        return fdAreaCode;
    }

    public void setFdAreaCode(String fdAreaCode) {
        this.fdAreaCode = fdAreaCode;
    }

    @Basic
    @Column(name = "fd_AreaName", nullable = true, length = 10)
    public String getFdAreaName() {
        return fdAreaName;
    }

    public void setFdAreaName(String fdAreaName) {
        this.fdAreaName = fdAreaName;
    }

    @Basic
    @Column(name = "fd_TransType", nullable = false, length = 50)
    public String getFdTransType() {
        return fdTransType;
    }

    public void setFdTransType(String fdTransType) {
        this.fdTransType = fdTransType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WeigherInfo_T_Entity that = (WeigherInfo_T_Entity) o;
        return fdRowid == that.fdRowid &&
                Objects.equals(fdWeigherCode, that.fdWeigherCode) &&
                Objects.equals(fdWeigherName, that.fdWeigherName) &&
                Objects.equals(fdAreaCode, that.fdAreaCode) &&
                Objects.equals(fdAreaName, that.fdAreaName) &&
                Objects.equals(fdTransType, that.fdTransType);
    }

    @Override
    public int hashCode() {

        return Objects.hash(fdRowid, fdWeigherCode, fdWeigherName, fdAreaCode, fdAreaName, fdTransType);
    }
}
